<template>
  <div>
    <template v-for="item in routes" :key="item.path">
      <router-link
        class="router-link"
        v-if="item.path !== '/'"
        :to="item.path"
        >{{ item.meta.title || item.name }}</router-link
      >
    </template>
  </div>
  <router-view></router-view>
</template>

<script>
import { defineComponent } from "vue";
import { routes } from "./router/index.js";
export default defineComponent({
  name: "App",
  setup() {
    return { routes };
  },
});
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.router-link {
  display: inline-block;
  margin-right: 20px;
  margin-bottom: 20px;
}
</style>
